<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>
<script type="text/javascript" src="<?php echo JS_PATH?>jquery.sgallery.js"></script>
<div class="pad-lr-10">
<form name="searchform" action="" method="get">
		<input type="hidden" value="user_info" name="m"> 
		<input type="hidden" value="redpacket" name="c"> 
		<input type="hidden" value="recommend" name="a">
		<table width="100%" cellspacing="0" class="search-form">
			<tbody>
				<tr>
					<td>
						<div class="explain-col">
							<?php echo L('tel')?>:
							<input name="tel" class="input-text" value="<?php echo $tel?>" type="text" size="20"> 
							<!--<?php echo L('date')?>:
							<?php echo form::date('dynamic[start_time]',$start_time,1)?>- &nbsp;<?php echo form::date('dynamic[end_time]',$end_time,1)?>-->
							<input type="submit" value="<?php echo L('search')?>" class="button" name="dosubmit">

						</div>
					</td>
				</tr>
			</tbody>
		</table>
	</form>
<form name="myform" action="?m=user_info&c=dynamic&a=del" method="post" onsubmit="return confirm('<?php echo L('dynamic_confirm')?>')">
<div class="table-list">
<table width="100%" cellspacing="0">
	<thead>
		<tr>
			<!-- <th  align="center" width="20"><input type="checkbox" value="" id="check_box" onclick="selectall('id[]');"></th> -->
			<th align="center" width="20">ID</th>
			<th align="center" width="80"><?php echo L('receiptor_name')?></th>
			<th align="center" width="80"><?php echo L('recommend_name')?></th>
			<th align="center" width="80"><?php echo L('tel')?></th>
			<th align="center" width="80"><?php echo L('recevice_redpacket')?></th>
			<th align="center" width="80"><?php echo L('register_amount')?></th>
			<th align="center" width="80"><?php echo L('recevice_recommend')?></th>
			<th align="center" width="80"><?php echo L('recommend_amount')?></th>
			<th align="center" width="80"><?php echo L('time')?></th>
		</tr>
	</thead>
<tbody>
<?php
if(!empty($red_packet)){
	foreach($red_packet as $k=>$v) {
?>
    <tr>
		<!-- <td align="center"><input type="checkbox" value="<?php echo $v['id']?>" name="id[]"></td> -->
		<td align="center"><?php echo $v['id']?></td>
		<td align="center"><?php if($user[$v['user_id']]!=""){echo $user[$v['user_id']];}else{echo $v['user_tel'];}?></td>
		<td align="center"><?php if($user[$v['recommend_user_id']]){echo $user[$v['recommend_user_id']];}else{echo $v['user_tel'];}?></td>
		<td align="center"><?php echo $v['user_tel'];?></td>
		<td align="center"><?php if($v['is_recevice_register']==0){echo '否';}else{echo '是';}?></td>
		<td align="center"><?php echo $v['register_amount']?></td>
		<td align="center"><?php if($v['is_recevice_recommend']==0){echo '否';}else{echo '是';}?></td>
		<td align="center"><?php echo $v['recommend_amount']?></td>
		<td align="center"><?php echo $v['create_time']?></td>
    </tr>
<?php
}}else{
?>
	<tr><td colspan='9' style='color:red;font-size:18px;text-align:center;'><span>暂无数据！</span></td></tr>
<?php }?>
</tbody>
</table>

<!-- <div class="btn">
<label for="check_box"><a href="#" onClick="javascript:$('input[type=checkbox]').attr('checked', true)"><?php echo L('select_all')?></a>/<a href="#" onClick="javascript:$('input[type=checkbox]').attr('checked', false)"><?php echo L('cancel')?></a></label> <input type="submit" class="button" name="dosubmit" value="<?php echo L('delete')?>"/>
</div> -->

<div id="pages"><?php echo $pages?></div>
</div>
</form>
</div>
</body>
</html>